<?php

namespace vico\reservarBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ProductType extends AbstractType
{
        /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
										->add('service','entity',array(
																	
																		'label'=>'Gremio',
																		'class'=>'rsBundle:Service',
																		'attr'=>array(
																																	'class'=>'form-control'	
																									)),0)	
										
										->add('name','text',array(
																												'label'=>'Producto',
																												'attr'=>array(
																																				'class'=>'form-control',
																													)
																),1)
										->add('description','text',array(
																												'label'=>'Descripción',
																												'attr'=>array(
																																				'class'=>'form-control',
																													)
																),2)
										->add('price','text',array(
																												'label'=>'Importe (€)',
																												'attr'=>array(
																																				'class'=>'form-control',
																													)
																					),3)
																
        ;
    }
    
    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'vico\reservarBundle\Entity\Product'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'vico_reservarbundle_product';
    }
}
